<?php
/**
 * Created by PhpStorm.
 * User: ford
 * Date: 15-7-6
 * Time: 下午2:36
 */
error_reporting(E_ALL);
require_once("PHPMailer-master/PHPMailerAutoload.php");

$mail = new PHPMailer();

$mail->From = "fromPHPMailer@gmail.com";
$mail->addAddress("learnmdk@126.com");

$mail->Subject = "PHPMailer Message";
$mail->Body = "使用PHPmMailer发送电子邮件比PHP自带的Mail函数更方便！";

if($mail->send()) {
	echo "Message has been sent.\n";
} else {
	echo "Message was not sent because of error:\n";
	echo $mail->ErrorInfo . "\n";
}